package com.dragon.annotation;

import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;

/**
 * 数据库表
 *
 * @author dragon
 * @since 2019/11/12
 */
public class EntityTable {

    private String primaryKeyName;

    private boolean isAutoIncrement;

    private List<String> uniqueConstraintColumnList = new ArrayList<>();

    private String name;

    private String catalog;

    private String schema;

    private LinkedHashSet<EntityColumn> entityClassColumns = new LinkedHashSet<>();

    public String getPrimaryKeyName() {
        return primaryKeyName;
    }

    public void setPrimaryKeyName(String primaryKeyName) {
        this.primaryKeyName = primaryKeyName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCatalog() {
        return catalog;
    }

    public void setCatalog(String catalog) {
        this.catalog = catalog;
    }

    public String getSchema() {
        return schema;
    }

    public void setSchema(String schema) {
        this.schema = schema;
    }

    public LinkedHashSet<EntityColumn> getEntityClassColumns() {
        return entityClassColumns;
    }

    public void setEntityClassColumns(LinkedHashSet<EntityColumn> entityClassColumns) {
        this.entityClassColumns = entityClassColumns;
    }

    public boolean isAutoIncrement() {
        return isAutoIncrement;
    }

    public void setAutoIncrement(boolean autoIncrement) {
        isAutoIncrement = autoIncrement;
    }

    public List<String> getUniqueConstraintColumnList() {
        return uniqueConstraintColumnList;
    }

    public void setUniqueConstraintColumnList(List<String> uniqueConstraintColumnList) {
        this.uniqueConstraintColumnList = uniqueConstraintColumnList;
    }

    @Override
    public String toString() {
        return "EntityTable{" +
                "primaryKeyName='" + primaryKeyName + '\'' +
                ", isAutoIncrement=" + isAutoIncrement +
                ", uniqueConstraintColumnList=" + uniqueConstraintColumnList +
                ", name='" + name + '\'' +
                ", catalog='" + catalog + '\'' +
                ", schema='" + schema + '\'' +
                ", entityClassColumns=" + entityClassColumns +
                '}';
    }
}
